﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace express.bttree
{
    public class Context
    {
        private Object? args;

        private List<Object> callResults = new List<object> ();


        public Object? Args
        {
            get { return args; }    
            set { args = value; }
        }

        public void AddResult(Object result)
        {
            callResults.Add(result);
        }

        public Object getResultAtIndex(int index)
        {
            if(callResults.Count > index)
            {
                return callResults[index];
            } 
            else
            {
                return null;
            }
        }

    }
}
